﻿using FlowCanvas.Nodes;
using LogSystem;
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using Yoozoo.Gameplay.Liberty;
using Yoozoo.Gameplay.Liberty.AI;

namespace Yoozoo.Gameplay.Liberty.Nodes
{
    [Category("Ggame")]
    public class PlayerChangeRangedWeapon : CallableActionNode<int>
    {
        public override void Invoke(int weaponId)
        {
            LibertyAIUtils.PlayerController.playerEntity.AIEntity.WeaponSystem.AddWeapon(weaponId);
            LibertyAIUtils.PlayerController.playerEntity.AIEntity.WeaponSystem.EquipWeapon(weaponId);
            LibertyAIUtils.PlayerController.playerEntity.AIEntity.battleAgent.ChangeWeapon(weaponId);
        }
    }
}